package io.github.idol.roomlist

import android.support.v7.util.DiffUtil
import io.github.idol.data.RoomListInfo

class RoomDiffCallback:DiffUtil.ItemCallback<RoomListInfo.ContentBean>(){

    override fun areItemsTheSame(oldItem: RoomListInfo.ContentBean, newItem: RoomListInfo.ContentBean): Boolean {
        return oldItem.roomId == newItem.roomId
    }

    override fun areContentsTheSame(oldItem: RoomListInfo.ContentBean, newItem: RoomListInfo.ContentBean): Boolean {
        return oldItem == newItem
    }
}